package rsj.dao;

import java.sql.Connection;
import java.sql.SQLException;


import rsj.table.WebItem;

import com.rlyy.aibase.db.QueryRunner;
import com.rlyy.aibase.utils.base.TableNode;

public class WebItemDao {
	private static final WebItemDao infoDao = new WebItemDao();
	
	 public static WebItemDao getInstance(){
	        return infoDao;
	 }
	 
	 public TableNode findAllItem(Connection conn,String status)throws SQLException{
		 QueryRunner queryRunner = new QueryRunner();
		 StringBuffer findsql = new StringBuffer();
		 findsql.append("select "+WebItem.Item_Id+","+WebItem.Item_Name+" from "+WebItem.Table_Name)
		 		 .append(" where "+WebItem.Item_Typeid +" = ?");
		 return  queryRunner.queryLinkTableNode(conn,findsql.toString(),status);
	 }

}
